package cn.xuguowen.user.designPatten.strategy.heima;

/**
 * ClassName: Client
 * Package: cn.xuguowen.user.designPatten.strategy.heima
 * Description:
 * 客户端
 * @Author 徐国文
 * @Create 2023/4/28 18:15
 * @Version 1.0
 */
public class Client {
    public static void main(String[] args) {
        // 春节促销活动
        SalesMan salesMan = new SalesMan(new SaleStrategyOne());
        salesMan.saleStrategy();

        // 元宵节到来，促销活动更换了
        salesMan.setStrategy(new SaleStrategyTwo());
        salesMan.saleStrategy();

        // 五一劳动节到来，促销活动又更换了
        salesMan.setStrategy(new SaleStrategyThree());
        salesMan.saleStrategy();
    }
}
